/**
* @package Scribble
*/
$(document).ready(function() {

	// Add confirmation to "delete" button
	$('button[rel=folder-delete]').click(function() {
		return confirm("Are you sure you want to remove this folder\nand all files it contains?");
	}).attr('disabled', '');

	// Show privilege categories if the "let me define..." option is chosen
	$('#privileges').css('display', !$('#security-auth').attr('checked') ? 'none' : 'block');

	// Add handlers to the pallow options that will show/hide the privileges
	// categories
	$('#security-inherit, #security-allow-all').click(function() {
		$('#privileges').slideUp();
	});
	$('#security-auth').click(function() {
		$('#privileges').slideDown();
	});
});